const path = require('path')

// 多入口代码分离
module.exports = {
	mode: 'development',
	entry: {
		entry1: './src/entrys/entry_split_1.js',
		entry2: './src/entrys/entry_split_1.js',
	},
	output: {
		filename: '[name].bundle.js',
		path: path.resolve(__dirname, '../dists/codeSeparation')
	},
	// treeShaking和代码分离配置
	optimization: {
		usedExports: true,
		splitChunks: {
			chunks: 'all'
		}
	}
}